home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / mmdf / mmdf-IIb.43 / conf / csnet-relay / chan.c next >
Encoding:
C/C++ Source or Header  |  1987-03-11  |  3.2 KB  |  101 lines

  1. #include "util.h"
  2. #include "mmdf.h"
  3. #include "ch.h"
  4. #include "dm.h"
  5.  
  6. char    *ch_dflnam = "local";
  7.  
  8. /* INITCHANS
  9. /*Alias    *al_list = (Alias *)0;
  10. /**/
  11.  
  12. /*******************  MAIL IDENTIFIER  SELECTION  ***********************/
  13.  
  14. /*
  15.  *    The global mid_enable controls the use of an alternate
  16.  *    mail name system refered to as Mail-Ids.  When mail-ids are
  17.  *    in use, login-ids and mail-ids are nolong bound to one another
  18.  *    by the system account database, and are bound only by mapping
  19.  *    tables.  The tables "mailids" and "users" will always be present
  20.  *    though they may not be used.  "mailids" maps a mailid to a
  21.  *    system account.  The table "users" maps a username to a mailid.
  22.  */
  23.  
  24. int    mid_enable = 0;
  25.  
  26. Table
  27.     tb_mailids =        /* Used in getpwmid() */
  28. {
  29.     "mailids", "Mail-ID to Username Mappings", "mailids", 0, 0l
  30. },
  31.     tb_users =        /* Used in getmailid() */
  32. {
  33.     "users", "Username to Mail-ID Mappings", "users", 0, 0l
  34. };
  35.  
  36.  
  37. /*
  38.  *  The following set of structures provides a complete list of channels
  39.  *  known to MMDF.
  40.  *
  41.  *  It is followed by two arrays that list the channels in useful orders.
  42.  *
  43.  *  ch_tbsrch[] is a full list, of all known channels, and is primarily
  44.  *  used to guide the ch_table routines when treating the hostname space as
  45.  *  flat (linear).  It also is used by lnk_submit, for sorting the address
  46.  *  linked-list.
  47.  *
  48.  *  THE ORDER IS CRITICAL.  A hostname may appear in several tables, but
  49.  *  the first table checked will cause the hit.
  50.  *
  51.  *  One nice aspect of this is that, for example, you can have a standard
  52.  *  arpanet host table, but have some of its hosts actually get mail on a
  53.  *  different channel.  Simply place that table's entry earlier in the
  54.  *  ch_tbsrch[] list.
  55.  *
  56.  *  ch_exsrch[] is a list of channels that are processed by Deliver
  57.  *  (usually just when it does standard, default daemon processing).
  58.  *  Therefore, it need contain only those channels that are active and are
  59.  *  to be processed by the daemon.  Again, order is important.  Channels
  60.  *  are processed in the order listed.  This means that, typically, you
  61.  *  want ch_sloc to be first, unless you have the strange view that foreign
  62.  *  mail is more important than local...
  63.  */
  64.  
  65. #include "chans.init"
  66.  
  67. /* INITCHANS
  68. /*LOCVAR Chan *chsrch[NUMCHANS+1] = {      /* Order chan tables searched */
  69. /*      (Chan *) 0
  70. /*};
  71. /**/
  72. Chan **ch_tbsrch = chsrch;
  73.  
  74. LOCVAR Chan *exsrch[NUMCHANS+1] = {    /* Order of active chan execution */
  75.     (Chan *) 0
  76. };
  77. Chan **ch_exsrch = exsrch;
  78. Chan * ch_ptrlist[NUMCHANS + 1];  /* can hold pointers to chans */
  79.  
  80. /* INITCHANS
  81. /*LOCVAR Table *tblist[NUMTABLES+1] = {      /* All known tables */
  82. /*    (Table *) 0
  83. /*};
  84. /**/
  85. Table **tb_list = tblist;
  86.  
  87. LOCVAR Domain *dmlist[NUMDOMAINS+1];
  88. Domain **dm_list = dmlist;         /* all known domains */
  89.  
  90. int     tb_maxtables = NUMTABLES; /* max number of slots */
  91. int     ch_maxchans = NUMCHANS;   /* max number of slots */
  92. int     dm_maxtables = NUMDOMAINS; /* max number of slots */
  93.  
  94. /* These next entries should reflect the ACTUAL number of slots in use  */
  95.  
  96. /* INITCHANS
  97. /*int     tb_numtables = 0;         /* actual number of tables */
  98. /*int     ch_numchans = 0;          /* actual number of channels */
  99. /**/
  100. int     dm_numtables = 0;         /* actual number of domains */
  101.